home *** CD-ROM | disk | FTP | other *** search
/ Aminet 6 / Aminet 6 - June 1995.iso / Aminet / gfx / 3d / irit50src.lha / irit5 / include / allocate.h next >
Encoding:
C/C++ Source or Header  |  1995-01-29  |  4.0 KB  |  119 lines

  1. /*****************************************************************************
  2. * Definitions, visible to others, of the dynamic allocator module.         *
  3. *                                         *
  4. * Written by:  Gershon Elber                Ver 0.2, Mar. 1990   *
  5. *****************************************************************************/
  6.  
  7. #ifndef    ALLOCATE_GH
  8. #define    ALLOCATE_GH
  9.  
  10. #include "iritprsr.h"
  11. #include "cagd_lib.h"
  12. #include "trim_lib.h"
  13. #include "triv_lib.h"
  14.  
  15.  
  16. #if defined(__cplusplus) || defined(c_plusplus)
  17. extern "C" {
  18. #endif
  19.  
  20. IPVertexStruct *IPAllocVertex(ByteType Count,
  21.                   ByteType Tags,
  22.                   IPPolygonStruct *PAdj,
  23.                   IPVertexStruct *Pnext);
  24. IPPolygonStruct *IPAllocPolygon(ByteType Count,
  25.                 ByteType Tags,
  26.                 IPVertexStruct *V,
  27.                 IPPolygonStruct *Pnext);
  28. IPObjectStruct *IPAllocObject(char *Name,
  29.                   IPObjStructType ObjType,
  30.                   IPObjectStruct *Pnext);
  31. void IPFreeVertex(IPVertexStruct *V);
  32. void IPFreePolygon(IPPolygonStruct *P);
  33. void IPFreeObject(IPObjectStruct *O);
  34. void IPFreeVertexList(IPVertexStruct *VFirst);
  35. void IPFreePolygonList(IPPolygonStruct *PPoly);
  36. void IPFreeObjectList(IPObjectStruct *O);
  37.  
  38. int ListObjectLength(IPObjectStruct *PObj);
  39. int ListObjectFind(IPObjectStruct *PObjList, IPObjectStruct *PObj);
  40. void ListObjectInsert(IPObjectStruct *PObjList,
  41.               int Index,
  42.               IPObjectStruct *PObjItem);
  43. IPObjectStruct *ListObjectGet(IPObjectStruct *PObjList, int Index);
  44. void ReallocNewTypeObject(IPObjectStruct *PObj, IPObjStructType ObjType);
  45.  
  46. IPObjectStruct *GenPolyObject(char *Name,
  47.                   IPPolygonStruct *Pl,
  48.                   IPObjectStruct *Pnext);
  49. IPObjectStruct *GenPOLYObject(IPPolygonStruct *Pl);
  50. IPObjectStruct *GenCrvObject(char *Name,
  51.                  CagdCrvStruct *Crv,
  52.                  IPObjectStruct *Pnext);
  53. IPObjectStruct *GenCRVObject(CagdCrvStruct *Crv);
  54. IPObjectStruct *GenSrfObject(char *Name,
  55.                  CagdSrfStruct *Srf,
  56.                  IPObjectStruct *Pnext);
  57. IPObjectStruct *GenSRFObject(CagdSrfStruct *Srf);
  58. IPObjectStruct *GenTrimSrfObject(char *Name,
  59.                  TrimSrfStruct *TrimSrf,
  60.                  IPObjectStruct *Pnext);
  61. IPObjectStruct *GenTRIMSRFObject(TrimSrfStruct *TrimSrf);
  62. IPObjectStruct *GenTrivarObject(char *Name,
  63.                 TrivTVStruct *Triv,
  64.                 IPObjectStruct *Pnext);
  65. IPObjectStruct *GenTRIVARObject(TrivTVStruct *Triv);
  66. IPObjectStruct *GenCtlPtObject(char *Name,
  67.                    CagdPointType PtType,
  68.                    CagdRType *CagdCoords,
  69.                    RealType *Coords,
  70.                    IPObjectStruct *Pnext);
  71. IPObjectStruct *GenCTLPTObject(CagdPointType PtType,
  72.                    CagdRType *CagdCoords,
  73.                    RealType *Coords);
  74. IPObjectStruct *GenNumObject(char *Name, RealType *R, IPObjectStruct *Pnext);
  75. IPObjectStruct *GenNUMObject(RealType *R);
  76. IPObjectStruct *GenNUMValObject(RealType R);
  77. IPObjectStruct *GenPtObject(char *Name,
  78.                 RealType *Pt0,
  79.                 RealType *Pt1,
  80.                 RealType *Pt2,
  81.                 IPObjectStruct *Pnext);
  82. IPObjectStruct *GenPTObject(RealType *Pt0, RealType *Pt1, RealType *Pt2);
  83. IPObjectStruct *GenVecObject(char *Name,
  84.                  RealType *Vec0,
  85.                  RealType *Vec1,
  86.                  RealType *Vec2,
  87.                  IPObjectStruct *Pnext);
  88. IPObjectStruct *GenVECObject(RealType *Vec0, RealType *Vec1, RealType *Vec2);
  89. IPObjectStruct *GenStrObject(char *Name, char *Str, IPObjectStruct *Pnext);
  90. IPObjectStruct *GenSTRObject(char *Str);
  91. IPObjectStruct *GenPlaneObject(char *Name,
  92.                    RealType *Plane0,
  93.                    RealType *Plane1,
  94.                    RealType *Plane2,
  95.                    RealType *Plane3,
  96.                    IPObjectStruct *Pnext);
  97. IPObjectStruct *GenPLANEObject(RealType *Plane0,
  98.                    RealType *Plane1,
  99.                    RealType *Plane2,
  100.                    RealType *Plane3);
  101. IPObjectStruct *GenMatObject(char *Name,
  102.                  MatrixType Mat,
  103.                  IPObjectStruct *Pnext);
  104. IPObjectStruct *GenMATObject(MatrixType Mat);
  105.  
  106. IPObjectStruct *CopyObject(IPObjectStruct *Dest,
  107.                IPObjectStruct *Src,
  108.                int CopyAll);
  109.  
  110. IPObjectStruct *CopyObjectList(IPObjectStruct *PObjs, int CopyAll);
  111. IPPolygonStruct *CopyPolygonList(IPPolygonStruct *Src);
  112. IPVertexStruct *CopyVertexList(IPVertexStruct *Src);
  113.  
  114. #if defined(__cplusplus) || defined(c_plusplus)
  115. }
  116. #endif
  117.  
  118. #endif    /* ALLOCATE_GH */
  119.